var express = require('express');
var router = express.Router();
var orderDao = require('../dao/orderDao')
var db = require('../config/basicConnection');
var $sqlCommands = require('../config/sqlCommand');

/**
 * 用户增加的路由控制接口
 */
router.get('/', function(req, res, next) {
    res.render('order', { title: '' });
});

router.get('/', function(req, res, next) {
    res.send('11');
});

// router.post('/findAllAction', function(req, res, next) {
//     prodDao.findAllAction(req,res,next)
// });

router.post('/insertOne', function(req, res, next) {
    orderDao.insertOne(req,res,next)
});
router.post('/findAllOrder',function(req,res,next){
    orderDao.findAllOrder(req,res,next)
})

router.post('/findAll',function(req,res,next){
    orderDao.findAll(req,res,next)
})

router.post('/findDiscount',function(req,res,next){
    orderDao.findDiscount(req,res,next)
})

router.post('/deteleById',function(req,res,next){
    orderDao.deteleById(req,res,next)
})

router.post('/confirmById',function(req,res,next){
    orderDao.confirmById(req,res,next)
})

router.post('/regretById',function(req,res,next){
    orderDao.regretById(req,res,next)
})


module.exports = router;
